package com.example.demo.demos.serviceImpl;

import com.example.demo.demos.dao.CaiMapper;
import com.example.demo.demos.entity.Cai;
import com.example.demo.demos.service.CaiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class CaiServiceImpl implements CaiService {
    @Autowired
    private CaiMapper caiMapper;

    @Override
    public Cai selectCai(int id) {
        return caiMapper.selectCai(id);
    }

    @Override
    public List<Cai> selectedAll() {
        return caiMapper.selectedAll();
    }

    @Override
    public void deleteCai(int id) {
        caiMapper.deleteCai(id);
    }

    @Override
    public void insertCai(Cai cai) {
       caiMapper.insertCai(cai);
    }

    @Override
    public void updateCai(int id) {
      caiMapper.updateCai(id);
    }
}
